
packages <- c("tidyverse","showtext","readxl","ltm","lavaan","scales","mice","estimatr","texreg","xtable","cjbart","foreign","ggExtra","car",
              "psych", "devtools")

for (package in packages) {
  if (!requireNamespace(package, quietly = TRUE)) {
    install.packages(package, dependencies = TRUE)
  }
}

if (!requireNamespace("cregg", quietly = TRUE)) {
  devtools::install_version("cregg",version="0.4.0")
}

library(tidyverse)
library(showtext)
library(readxl)
library(ltm)
library(lavaan)
library(scales)
library(mice)
library(estimatr)
library(texreg)
library(xtable)
library(cregg)
library(cjbart)
library(foreign)
library(ggExtra)
library(car)
library(psych)

